﻿<div ng-controller="tokenUserController">
    <div class="wrapper border-bottom white-bg page-heading">
        <div class="col-lg-pull-12">
            <ol class="breadcrumb">
                <li>会员信息</li>
            </ol>
        </div>
    </div>

    <form class="form-horizontal row">
        <div class="form-group">
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">昵称</label>
                <div class="col-sm-8 form-control-static">
                    {{model.name}}
                </div>
            </div>
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">马力值</label>
                <div class="col-sm-8 form-control-static">
                    {{model.total_horse_power}}
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">手机号</label>
                <div class="col-sm-8 form-control-static">
                    {{model.mobile}}
                </div>
            </div>
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">目前红钻数</label>
                <div class="col-sm-8 form-control-static">
                    {{(model.total_red_drill - model.consume_red_drill).toFixed(6)}}
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">姓名</label>
                <div class="col-sm-8 form-control-static">
                    {{model.user_name}}
                </div>
            </div>
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">总红钻数</label>
                <div class="col-sm-8 form-control-static">
                    {{model.total_red_drill}}
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">身份证号</label>
                <div class="col-sm-8 form-control-static">
                    {{model.card_no}}
                </div>
            </div>
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">邀请码</label>
                <div class="col-sm-8 form-control-static">
                    {{model.invitation_code}}
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">创建时间</label>
                <div class="col-sm-8 form-control-static">
                    {{model.create_time}}
                </div>
            </div>
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">邀请数量</label>
                <div class="col-sm-8 form-control-static">
                    {{model.invitation_num}}
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">上级用户</label>
                <div class="col-sm-8 form-control-static">
                    {{model.parent_mobile}}
                </div>
            </div>
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">用户等级</label>
                <div class="col-sm-8 form-control-static">
                    {{model.user_type_title}}
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">人脸认证</label>
                <div class="col-sm-8 form-control-static">
                    {{model.is_fac?"已认证":"未认证"}}
                </div>
            </div>
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">验证时间</label>
                <div class="col-sm-8 form-control-static">
                    {{model.face_time}}
                </div>
            </div>
        </div>
    </form>
    <h4>邀请好友记录</h4>
    <table style="table-layout:fixed;" class="table table-hover m-t-md">
        <thead>
            <tr style="background-color: #f7f7f9;">
                <th>序号</th>
                <th>昵称</th>
                <th>手机号</th>
                <th>姓名</th>
                <th>身份证号</th>
                <th>邀请创建时间</th>
            </tr>
        </thead>
        <tbody ng-repeat="item in model.user_invitation_his_list.rows">
            <tr>
                <td>{{item.merchant.id}}</td>
                <td>{{item.merchant.name}}</td>
                <td>{{item.merchant.mobile}}</td>
                <td>{{item.account_name}}</td>
                <td>{{item.id_card}}</td>
                <td>{{item.create_time}}</td>
            </tr>
        </tbody>
    </table>
    <div class="row">
        <div class="col-md-12">
            <uib-pagination total-items="model.user_invitation_his_list.total_result" items-per-page="model.user_invitation_his_list.size" ng-model="model.user_invitation_his_list.page" num-pages="model.user_invitation_his_list.total_pages"
                            ng-change="search_user_detail_page(model.user_invitation_his_list.page, model.user_red_transfer_his_list.page)" class="pagination-sm" boundary-links="true" boundary-link-numbers="true" max-size="30"
                            previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
            <span class="pull-right" style="margin: 30px 0px 20px 0px">共{{model.user_invitation_his_list.total_result}} 当前：{{model.user_invitation_his_list.page}}/{{model.user_invitation_his_list.total_pages}}</span>
        </div>
    </div>


    <h4>红钻转赠记录</h4>
    <table style="table-layout:fixed;" class="table table-hover m-t-md">
        <thead>
            <tr style="background-color: #f7f7f9;">
                <th>序号</th>
                <th>类型</th>
                <th>对象</th>
                <th>赠送数量</th>
                <th>手续费</th>
                <th>赠送时间</th>
            </tr>
        </thead>
        <tbody ng-repeat="item in model.user_red_transfer_his_list.rows">
            <tr>
                <td>{{$index+1}}</td>
                <td>{{item.receiver.id == model.merchant_id ? '转入' : '转出'}}</td>
                <td>{{item.receiver.id == model.merchant_id ? item.merchant.mobile :item.receiver.mobile}}</td>
                <td>{{item.amount}}</td>
                <td>{{item.fee}}</td>
                <td>{{item.create_time}}</td>
            </tr>
        </tbody>
    </table>
    <div class="row">
        <div class="col-md-12">
            <uib-pagination total-items="model.user_red_transfer_his_list.total_result" items-per-page="model.user_red_transfer_his_list.size" ng-model="model.user_red_transfer_his_list.page" num-pages="model.user_red_transfer_his_list.total_pages"
                            ng-change="search_user_detail_page(model.user_invitation_his_list.page, model.user_red_transfer_his_list.page)" class="pagination-sm" boundary-links="true" boundary-link-numbers="true" max-size="30"
                            previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"></uib-pagination>
            <span class="pull-right" style="margin: 30px 0px 20px 0px">共{{model.user_red_transfer_his_list.total_result}} 当前：{{model.user_red_transfer_his_list.page}}/{{model.user_red_transfer_his_list.total_pages}}</span>
        </div>
    </div>
    <div class="form-group form-group-sm">
        <label class="col-sm-2 control-label"></label>
        <div class="col-sm-3">
            <button ng-click="goBack()" class="btn btn-primary btn-sm"><i class="fa fa-rotate-left"></i> 返回</button>
        </div>
    </div>
</div>
